Skip to content

Update shell.nix#11

Open
khasc wants to merge 4 commits intolf-lang:mainfrom
khasc:main
Open

Update shell.nix#11
khasc wants to merge 4 commits intolf-lang:mainfrom
khasc:main

Conversation

@khasc
Copy link
Copy Markdown
Contributor

@khasc khasc commented Feb 25, 2026

address # FIXME in shellHook re: pololu_3pi_2040_robot.h:

  • we can export PICO_BOARD_HEADER_DIRS in environment instead of modifying the submodule pico-sdk. But, it appears that the custom board header is neither required nor used.

address # FIXME in shellHook. 
export PICO_BOARD_HEADER_DIRS in environment instead of modifying pico-sdk. It may even turn out the custom board header is no longer required or in use.
Copy link
Copy Markdown
Contributor

@edwardalee edwardalee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable to me, as long as it works.

@khasc
Copy link
Copy Markdown
Contributor Author

khasc commented Feb 27, 2026

looks like cmake is building for plain pico (see last four lines, "Defaulting"), and pololu_3pi_2040_robot appears in the target parameter platform but maybe not beyond that. (used a clean clone)

$ lfc src/Blink.lf 
lfc: info: Generating code for: file:/home/mi/lf-3pi/src/Blink.lf
lfc: info: Generation mode: STANDALONE
lfc: info: Generating sources into: /home/mi/lf-3pi/src-gen/Blink
lfc: info: Target Configuration:
      - single-threaded: true
      - platform: PlatformOptions[platform=rp2040, board=Option[setByUser=true, value=pololu_3pi_2040_robot], port=Option[setByUser=false, value=null], baudRate=Option[setByUser=false, value=0], flash=Option[setByUser=false, value=false], userThreads=Option[setByUser=false, value=0]]
Cleaning /home/mi/lf-3pi/include
--- Current working directory: /home/mi/lf-3pi/src-gen/Blink/build
--- Executing command: cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/home/mi/lf-3pi -DCMAKE_INSTALL_BINDIR=bin -DLF_FILE_SEPARATOR='"/"' -DLF_SOURCE_DIRECTORY=/home/mi/lf-3pi/src -DLF_PACKAGE_DIRECTORY=/home/mi/lf-3pi -DLF_SOURCE_GEN_DIRECTORY=/home/mi/lf-3pi/src-gen/Blink /home/mi/lf-3pi/src-gen/Blink
-- The C compiler identification is GNU 12.2.1
-- The CXX compiler identification is GNU 12.2.1
-- The ASM compiler identification is GNU
-- Found assembler: /nix/store/ys6f5rkagvk7j6mawa5fiakglv1568hl-gcc-arm-embedded-12.2.rel1/bin/arm-none-eabi-gcc
-- Detecting C compiler ABI info
Using PICO_SDK_PATH from environment ('/home/mi/lf-3pi/pico-sdk')
PICO_SDK_PATH is /home/mi/lf-3pi/pico-sdk
Defaulting platform (PICO_PLATFORM) to 'rp2040' since not specified.
Defaulting target board (PICO_BOARD) to 'pico' since not specified.
Using board configuration from /home/mi/lf-3pi/pico-sdk/src/boards/include/boards/pico.h
Pico Platform (PICO_PLATFORM) is 'rp2040'.

@khasc
Copy link
Copy Markdown
Contributor Author

khasc commented Feb 27, 2026

fwiw, I'm finding HillClimbSolution.lf builds no matter cmake uses the

  • SDK's pico.h (as we've probably been using anyways)
  • SDK pololu_3pi_2040_robot.h (which is rather sparse), or
  • template's pololu_3pi_2040_robot.h

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants